package com.xmy.cultivate.service.impl;

import com.xmy.cultivate.entity.SchoolNeeds;
import com.xmy.cultivate.entity.response.TidyRs;
import com.xmy.cultivate.mapper.SchoolNeedsMapper;
import com.xmy.cultivate.service.ISchoolNeedsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xmy.cultivate.entity.TryJob;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * <p>
 * 校区招聘需求表 服务实现类
 * </p>
 *
 * @author hpiggy
 * @since 2024-12-11
 */
@Service
public class SchoolNeedsServiceImpl extends ServiceImpl<SchoolNeedsMapper, SchoolNeeds> implements ISchoolNeedsService {

    @Autowired
    SchoolNeedsMapper schoolNeedsMapper;

    @Override
    public List<SchoolNeeds> querySchoolNeedList(String startDate, String endDate, String subjectsId) {

        return schoolNeedsMapper.querySchoolNeedList(startDate, endDate, subjectsId);
    }

    @Override
    public List<SchoolNeeds> querySchoolNeedTotal(String startDate, String endDate, String stationId) {

        return schoolNeedsMapper.querySchoolNeedTotal(startDate, endDate, stationId);
    }

    @Override
    public List<TryJob> queryTryJobBySchoolId(IPage<TryJob> page, String startDate, String endDate, String schoolId, String stationId, String type) {
        return schoolNeedsMapper.queryTryJobBySchoolId(page, startDate, endDate, schoolId, stationId, type);
    }

    @Override
    public List<SchoolNeeds> getAssignList(String startDate, String endDate, String stationNeedsId, String schoolId, String departmentId, Integer isDetails, Integer type, String subjectsId, String labourId, String stationId) {
        return schoolNeedsMapper.getAssignListV2(startDate, endDate, stationNeedsId, schoolId, departmentId, isDetails, type, subjectsId, labourId, stationId);
    }

    @Override
    public List<TryJob> getAssignDetails(IPage<TryJob> page, String startDate, String endDate, String schoolId, String departmentId, String detailsType, Integer type, String labourId, String stationId, String stationNeedsId, String subjectsId) {
        return schoolNeedsMapper.getAssignDetails(page, startDate, endDate, schoolId, departmentId, detailsType, type, labourId, stationId, stationNeedsId, subjectsId);
    }

    @Override
    public TryJob getDate() {
        return schoolNeedsMapper.getDate();
    }

    @Override
    public List<TidyRs> getAllNeedsSchool(@Param("yearPart") Integer yearPart,
                                          @Param("quarterNum") Integer quarterNum
    ) {
        return schoolNeedsMapper.getAllNeedsSchool(yearPart, quarterNum);
    }

    @Override
    public List<TidyRs> getAllNeedsSchoolForLess(Long stationId,
                                                 Long subjectsId,
                                                 Long areaId
    ) {
        return schoolNeedsMapper.getAllNeedsSchoolForLess(stationId, subjectsId,areaId);
    }


}
